unit uWin9901;

interface

uses
  Winapi.Windows,
  Winapi.Messages,
  System.SysUtils,
  System.Variants,
  System.Classes,
  Vcl.Graphics,
  Vcl.Controls,
  Vcl.Forms,
  Vcl.Dialogs,
  uWinBase,
  uniBasicGrid,
  uniGridExporters,
  uniGUIBaseClasses,
  uniGUIClasses,
  uniDBGrid,
  uniToolBar,
  uniEdit;

type
  TWin9901 = class(TWinBase)
    dgConfig: TUniDBGrid;
    tb1: TUniToolBar;
    btn1: TUniToolButton;
    btn2: TUniToolButton;
    btn3: TUniToolButton;
    btn4: TUniToolButton;
    edtKey: TUniEdit;
    btn5: TUniToolButton;
    procedure btn2Click(Sender: TObject);
    procedure btn5Click(Sender: TObject);
    procedure btn4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure FraInit(const aJson: string = ''); override;
    procedure FraFree(); override;
  end;

var
  Win9901: TWin9901;

implementation

{$R *.dfm}

{ TWin9901 }

procedure TWin9901.btn2Click(Sender: TObject);
begin
  dgFind(dgConfig, edtKey.Text, 'cName,cKey,cValue');
end;

procedure TWin9901.btn4Click(Sender: TObject);
begin
  dgAdd(dgConfig);
end;

procedure TWin9901.btn5Click(Sender: TObject);
begin
  dgExp(dgConfig);
end;

procedure TWin9901.FraFree;
begin
  inherited;
end;

procedure TWin9901.FraInit(const aJson: string);
begin
  inherited;
  dgLoad(dgConfig, 'select * from sys_config', []);
end;

initialization
  RegisterClass(TWin9901);

end.

